<script language="javascript">
	function ktra()
	{
		if(document.themtt.tieude.value=='')
		{
			alert('Xin vui lòng nhập tên loại tin tức!');
			document.themtt.tieude.focus();
			return false;
		}
		else 
			return true;
	}
	function ktranoidung(d)
	{
		//alert("fgjhfjgf");
		if(d.value==0)
			document.themtt.noidung.disabled=true;
		else
			document.themtt.noidung.disabled=false;
	}
</script>
</head>

<body>
<?php
	/*$kq=$knoi->queryCsdl("select max(thutuhienthi) as max_tt from thongtincongty");
	$n=mysql_fetch_array($kq);
	$tt=$n['max_tt'] + 1;*/
?>
	<form action="home_admin.php" name="themtt" method="post" onSubmit="return ktra();">
	<table align="center" class="styleform">
		<tr>
			<td class="styletitle">LOẠI TIN TỨC</td>
		</tr>
		<tr>
			<td class="stylelitle"><input type="radio" name="loai" value="1" checked="" onClick="ktranoidung(this)" />&nbsp;Tin tức&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" name="loai" value="0" onClick="ktranoidung(this)" />Tin nội bộ</td>
		</tr>
		<tr>
			<td class="stylelitle">Tên loại:<br><input type="text" size="62" name="tieude" /><input type="hidden" name="module"  value="xulythemloaitintuc"></td>
		</tr>
		<tr>
			<td class="stylelitle">Nội dung:<br><textarea cols="55" rows="5" name="noidung" id="idnoidung"></textarea>
			<?php
					$CKEditor = new CKEditor();
					$CKEditor->basePath = 'ckeditor/';
					$CKEditor->replace("idnoidung");
				?>			</td>
		</tr>
		<script type="text/javascript" language="javascript">
   				 ckeditor.replace( 'idnoidung' );
			</script>
		<tr>
		  <td align="center"><input name="submit" type="submit" class="button" value="Thêm thông tin"/>
		    &nbsp;
	      <input name="reset" type="reset" class="button" value="Hủy bỏ" /></td></tr>
	</table>
	</form>